package page58;

public class Test6 {
    public static void main(String[] args) {
        int end = 8888;
        int i;
        int sum = 0;
        for (i = 1; sum < end; i++) {
            sum += i;
        }
        System.out.println(sum - i);
        System.out.println(i - 1);
    }
}
